#! /bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src

# Test Vala support: strings with hexadecimal escape sequences that are
# invalid UTF-8.

cat <<\EOF > xg-vala-4.vala
_("\xE0")
EOF

: ${XGETTEXT=xgettext}
LANGUAGE= LC_ALL=C ${XGETTEXT} --no-location --from-code=UTF-8 -d xg-vala-4.tmp xg-vala-4.vala 2>xg-vala-4.err
result=$?
cat xg-vala-4.err
test $result = 1 || Exit 1
grep 'is not UTF-8 encoded' xg-vala-4.err >/dev/null || Exit 1

exit 0
